<?php
// vim: set ts=4 sw=4 sts=4 et:

/**
 * LiteCommerce
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to licensing@litecommerce.com so we can send you a copy immediately.
 *
 * PHP version 5.3.0
 *
 * @category  LiteCommerce
 * @author    Creative Development LLC <info@cdev.ru>
 * @copyright Copyright (c) 2011 Creative Development LLC <info@cdev.ru>. All rights reserved
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
 * @link      http://www.litecommerce.com/
 * @see       ____file_see____
 * @since     1.0.0
 */

namespace XLite\Model\Order;

/**
 * Surcharge
 *
 * @see   ____class_see____
 * @since 1.0.0
 *
 * @Entity
 * @Table  (name="order_surcharges")
 */
class Surcharge extends \XLite\Model\Base\Surcharge
{
    /**
     * Surcharge owner (order)
     *
     * @var   \XLite\Model\Order
     * @see   ____var_see____
     * @since 1.0.0
     *
     * @ManyToOne  (targetEntity="XLite\Model\Order", inversedBy="surcharges")
     * @JoinColumn (name="order_id", referencedColumnName="order_id")
     */
    protected $owner;

    /**
     * Get order
     *
     * @return void
     * @see    ____func_see____
     * @since  1.0.0
     */
    public function getOrder()
    {
        return $this->getOwner();
    }
    /**
     * Get id
     *
     * @return uinteger $id
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set type
     *
     * @param fixedstring $type
     */
    public function setType($type)
    {
        $this->type = $type;
    }

    /**
     * Get type
     *
     * @return fixedstring $type
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Set code
     *
     * @param string $code
     */
    public function setCode($code)
    {
        $this->code = $code;
    }

    /**
     * Get code
     *
     * @return string $code
     */
    public function getCode()
    {
        return $this->code;
    }

    /**
     * Set class
     *
     * @param string $class
     */
    public function setClass($class)
    {
        $this->class = $class;
    }

    /**
     * Get class
     *
     * @return string $class
     */
    public function getClass()
    {
        return $this->class;
    }

    /**
     * Set include
     *
     * @param boolean $include
     */
    public function setInclude($include)
    {
        $this->include = $include;
    }

    /**
     * Get include
     *
     * @return boolean $include
     */
    public function getInclude()
    {
        return $this->include;
    }

    /**
     * Set available
     *
     * @param boolean $available
     */
    public function setAvailable($available)
    {
        $this->available = $available;
    }

    /**
     * Get available
     *
     * @return boolean $available
     */
    public function getAvailable()
    {
        return $this->available;
    }

    /**
     * Set value
     *
     * @param decimal $value
     */
    public function setValue($value)
    {
        $this->value = $value;
    }

    /**
     * Get value
     *
     * @return decimal $value
     */
    public function getValue()
    {
        return $this->value;
    }

    /**
     * Set name
     *
     * @param string $name
     */
    public function setName($name)
    {
        $this->name = $name;
    }

    /**
     * Set owner
     *
     * @param XLite\Model\Order $owner
     */
    public function setOwner(\XLite\Model\Order $owner)
    {
        $this->owner = $owner;
    }

    /**
     * Get owner
     *
     * @return XLite\Model\Order $owner
     */
    public function getOwner()
    {
        return $this->owner;
    }
}